package com.example.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.entity.VoAptDetail;
import com.example.entity.VoAptList;
import com.example.entity.VoReadyAppiont;
import com.example.pojo.Appointment;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 挂号预约表(Appointment)表数据库访问层
 *
 * @email: pengyujun53@163.com
 * @author: peng_YuJun
 * @date: 2024/01/17
 * @time: 23:08
 */
 @Repository
public interface AppointmentMapper extends BaseMapper<Appointment>{

    /**
     * 获取所有会话记录
     * @param userId
     * @return
     */
    List<VoAptList> selectAptList(Long userId);

    /**
     * 查询会话关联的病单，药单等详细关联信息
     */
    VoAptDetail selectAptDetail(Long id);

    /**
     * 根据医生id查询预约列表
     * @param drId
     * @return
     */
    List<VoReadyAppiont> selectReadyApmt(Long drId);
}

